<?php
    class Propiedade extends AppModel{
    	var $name = 'Propiedade';
    	public $belongsTo = array(
			'Categoria' => array(
				'foreignKey' => 'idCat'			
			),
			'Operacione' => array(
				'foreignKey' => 'idOp'				
			)
		);
		
		public $hasMany = array(
			'Imagene' => array(
				'foreignKey' => 'idProp'
			)
		);
		
		public $hasAndBelongsToMany = array(
			'propRelacionada' => array(
					'className'				=> 'Propiedade',
					'joinTable'				=> 'Relacionadas',
					'foreignKey' 			=> 'propiedad',
					'associationForeignKey' => 'relacionada'					
			)
		);
    }
?>